<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>项目添加页面</title>
  <link rel="stylesheet" href="../../../yl/index.css" />
  <!-- 布局样式 -->
  <link rel="stylesheet" href="../../../yl/style.css" />
  <link rel="stylesheet" href="../../../style/wangeditor.css">
  <link rel="stylesheet" href="../../../yl/mobile.css" />
  <link rel="stylesheet" href="../../../yl/easyui.css" />
  <link rel="stylesheet" href="../../../yl/icon.css" />
</head>

<body>
  <!-- <div id="app"> -->
  <div class="easyui-navpanel" id="app" v-cloak>
    <header>
      <div class="m-toolbar">
        <div class="m-title">
          {{check=='1'?'验收进度':dataForm1.Project_Node_Status!='4'?(type=='0'?'上传':'查看')+'项目节点进度':'上传返工佐证'}}</div>
      </div>
    </header>
    <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
      id="MainTable" ref="MainTable"
      :data-options="JSON.stringify({ 'TableName': 'project_node_log', 'form': 'dataForm' ,'primary_key':'Project_Node_Log_SerialNumber' })">
      <div class="yl-main">
        <div class="table_titel">
          <div class="titel">项目信息</div>
        </div>
        <el-form :model="dataForm" ref="form" :inline-message="true" style="width: 100%">
          <el-descriptions :column="6" border size="large" direction="vertical">
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">项目名称</div>
              </template>
              <el-form-item prop="Project_Name">
                <el-input disabled v-model="dataForm1.Project_Name" class="borderless-input" placeholder="请输入项目名称" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">项目类别</div>
              </template>
              <el-form-item prop="Project_Category">
                <el-input disabled v-model="dataForm1.Project_Category" class="borderless-input"
                  placeholder="请输入项目名称" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">项目总预算金额</div>
              </template>
              <el-form-item prop="Project_Budget">
                <el-input disabled v-model="dataForm1.Project_Budget" class="borderless-input" placeholder="请输入项目名称" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">项目节点</div>
              </template>
              <el-form-item prop="Project_Node">
                <el-input disabled v-model="dataForm1.Project_Node" class="borderless-input" placeholder="请输入项目节点" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">预期开始时间</div>
              </template>
              <el-form-item prop="Project_Name">
                <el-input disabled v-model="dataForm1.Project_Node_Start_Date" class="borderless-input"
                  placeholder="预期开始时间" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">预期结束时间</div>
              </template>
              <el-form-item prop="Project_Name">
                <el-input disabled v-model="dataForm1.Project_Node_End_Date" class="borderless-input"
                  placeholder="预期结束时间" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">项目备注</div>
              </template>
              <el-form-item prop="Project_Node_Remarks">
                <el-input disabled v-model="dataForm1.Project_Node_Remarks" class="borderless-input"
                  placeholder="暂无备注" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">项目实施主体</div>
              </template>
              <el-form-item prop="Agensies_Name">
                <el-input disabled v-model="dataForm1.Agensies_Name" class="borderless-input" placeholder="项目实施主体" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">紧急程度</div>
              </template>
              <el-form-item prop="Emergency_Sign">
                <el-input disabled v-model="dataForm1.Emergency_Sign" class="borderless-input" placeholder="紧急程度" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">项目节点负责人</div>
              </template>
              <el-form-item prop="Personal_Name">
                <el-input disabled v-model="dataForm1.Personal_Name" class="borderless-input" placeholder="施工单位名称" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">项目节点施工单位</div>
              </template>
              <el-form-item prop="Construction_Company_Name">
                <el-input disabled v-model="dataForm1.Construction_Company_Name" class="borderless-input"
                  placeholder="施工单位名称" />
              </el-form-item>
            </el-descriptions-item>
          </el-descriptions>
        </el-form>
        <div v-if="check == '' && type == '0'" class="table_titel">
          <div class="titel">{{check=='1'?'验收进度':dataForm1.Project_Node_Status!='4'?'上传项目节点进度':'上传返工佐证'}}</div>
        </div>
        <el-form v-if="check == '' && type == '0'" :model="dataForm" ref="form3" :inline-message="true" style="width: 100%">
          <el-descriptions :column="2" size="large" border>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">上传进度</div>
              </template>
              <el-form-item prop="Completion_Progress"
                :rules="[{ required: true, message: '请输入项目名称', trigger: 'blur' }]">
                <el-input-number v-model="dataForm1.Completion_Progress"
                  :min="Number(dataForm1.Completion_Progress_Original)" :max="100" :step="5"></el-input-number>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item v-if="check!='1'">
              <template #label>
                <div class="cell-item">{{dataForm1.Project_Node_Status!='4'?'工作时间':'返工时间'}} </div>
              </template>
              <el-form-item prop="Completion_Date"
                :rules="[{ required: true, message: '请选择'+dataForm1.Project_Node_Status!='4'?'上传时间':'返工时间', trigger: 'change' }]">
                <el-date-picker v-model="dataForm.Completion_Date" type="date" placeholder="请选择时间"
                  class="borderless-input" format="YYYY-MM-DD" value-format="YYYY-MM-DD" size="large" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">当前进度</div>
              </template>
              <el-form-item>
                <el-progress :text-inside="true" :color="Colors" :stroke-width="24"
                  :percentage="dataForm1.Completion_Progress" status="success"></el-progress>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item v-if="check!='1'">
              <template #label>
                <div class="cell-item">{{dataForm1.Project_Node_Status!='4'?'':'返工完成'}}佐证</div>
              </template>
              <el-form-item prop="Project_Name">
                <yl-upload ref="ylUpload" drag @success="success" @remove="remove" :limit="99"
                  :file="fileList"></yl-upload>
              </el-form-item>
            </el-descriptions-item>
          </el-descriptions>
        </el-form>
        <el-dialog v-model="showDialog" width="800" class="custom-dialog">
          <template #header>
            <div class="dialog-header">
              <span>查看佐证</span>
            </div>
          </template>
          <div class="dialog-content">
            <el-table id="table" border max-height="500" tooltip-effect="dark" :data="dataForm3">
              <el-table-column align="center" type="index" label="#" width="40"></el-table-column>
              <el-table-column min-width="180" prop="Attachment_SerialNumber" label="附件流水号"></el-table-column>
              <el-table-column min-width="180" prop="Attachment_Name" label="附件名称"></el-table-column>
              <el-table-column min-width="180" prop="Attachment_URL" label="磁盘文件名"></el-table-column>
              <el-table-column width="200" fixed="right" align="center" label="操作">
                <template v-slot="{row}">
                  <el-button type="primary" size="small" @click="preview(row)">
                    在线预览
                  </el-button>
                  <el-button type="success" size="small" @click="download(row)">
                    下载附件
                  </el-button>
                </template>
              </el-table-column>
            </el-table>
          </div>
          <template #footer>
            <div class="dialog-footer">
              <el-button @click="showDialog = false" class="cancel-btn">取消</el-button>
            </div>
          </template>
        </el-dialog>
        <yl-online-preview :file-url="fileUrl" v-model="showDialog1"></yl-online-preview>
        <div id="ChildTable">
          <div class="table_titel">
            <div class="titel">{{check!='1'?'历史上传':'进度上传'}}</div>
          </div>
          <el-table id="table" border max-height="450" tooltip-effect="dark"
            :data="dataForm2.filter(i=>i.Completion_Progress!='0')" @selection-change="handleSelectionChange">
            <el-table-column align="center" type="index" label="#" width="50"></el-table-column>
            <el-table-column min-width="180" label="项目名称">
              <template v-slot="{row}">
                {{dataForm1.Project_Name}}
              </template>
            </el-table-column>
            <el-table-column min-width="180" label="项目节点">
              <template v-slot="{row}">
                {{dataForm1.Project_Node}}
              </template>
            </el-table-column>
            <el-table-column min-width="180" prop="Completion_Progress" label="本次增加进度（%）"></el-table-column>
            <el-table-column min-width="180" label="目前总完工进度（%）">
              <template v-slot="{row,$index}">
                {{Current_Progress($index)}} <el-tag style="margin-left: 10px;" type="danger"
                  v-if="row.Completion_Progress=='0'">返工</el-tag>
              </template>
            </el-table-column>
            <el-table-column min-width="180" prop="Completion_Date" label="完成时间"></el-table-column>
            <el-table-column width="100" fixed="right" align="center" label="操作">
              <template v-slot="{row}">
                <el-button type="primary" size="small" @click="show(row)">
                  查看佐证
                </el-button>
                <!-- <el-button type="primary" size="small" @click="preview(row)">
                        在线预览
                    </el-button>
                    <el-button type="success" size="small" @click="download(row)">
                        下载附件
                    </el-button> -->
              </template>
            </el-table-column>
          </el-table>
          <div class="table_titel">
            <div class="titel">返工记录</div>
          </div>
          <el-table id="table" border max-height="450" tooltip-effect="dark" :data="dataForm4">
            <el-table-column align="center" type="index" label="#" width="50"></el-table-column>
            <el-table-column min-width="180" label="项目名称">
              <template v-slot="{row}">
                {{dataForm1.Project_Name}}
              </template>
            </el-table-column>
            <el-table-column min-width="180" label="项目节点">
              <template v-slot="{row}">
                {{dataForm1.Project_Node}}
              </template>
            </el-table-column>
            <!-- <el-table-column min-width="180" align="center" prop="Completion_Date" label="验收结果">
              <template v-slot="{row}">
                <el-tag :type="row.Row_Status=='0'?'success':row.Row_Status=='1'?'danger':row.Row_Status=='2'?'warning':''">{{row.Row_Status=='0'?'验收通过':row.Row_Status=='1'?'验收失败':row.Row_Status=='2'?'重新发起验收':''}}</el-tag>
              </template>
            </el-table-column> -->
            <el-table-column min-width="180" prop="Reason" label="返工原因"></el-table-column>
            <el-table-column min-width="180" prop="Create_Datetime" label="验收日期">
              <template v-slot="{row}">
                {{getYMDDate(row.Create_Datetime)}}
              </template>
            </el-table-column>
            <el-table-column min-width="180" prop="Completion_Date" label="返工日期"></el-table-column>
            <el-table-column width="100" fixed="right" align="center" label="操作">
              <template v-slot="{row}">
                <el-button type="primary" size="small" @click="show(row)">
                  查看佐证
                </el-button>
                <!-- <el-button type="primary" size="small" @click="preview(row)">
                        在线预览
                    </el-button>
                    <el-button type="success" size="small" @click="download(row)">
                        下载附件
                    </el-button> -->
              </template>
            </el-table-column>
          </el-table>
          <el-descriptions
            :data-options="JSON.stringify({'TableName': 'project_node_log_attachment', 'form': 'childDataForm', 'ParentTableName': 'project_node_log'})">
          </el-descriptions>
        </div>
      </div>
    </div>
    <footer class="botton-ann">
      <el-button @click="goBack">返回</el-button>
      <el-button type="primary" v-if="check!='1' && type == '0'" plain @click="handleSubmit" :loading="loading">提交</el-button>
      <template v-else-if="check == '1'">
        <el-button type="success" plain @click="handleSubmit1('3')" :loading="loading">验收通过</el-button>
        <el-button type="danger" plain @click="handleSubmit1('4')" :loading="loading">验收不通过</el-button>
      </template>
    </footer>
  </div>
</body>
<script src="../../../utils/utils.js"></script>
<script src="../../../config/config.js"></script>
<script src="../../../utils/compressor.js"></script>
<script src="../../../utils/wangeditor.js"></script>
<script src="../../../utils/mixins.js"></script>
<script src="../../../yl/vue.js"></script>
<script src="../../../yl/index.js"></script>
<script src="../../../yl/zh-cn.mjs"></script>
<script src="../../../yl/index.iife.min.js"></script>
<script src="../../../yl/jquery.min.js"></script>
<script src="../../../utils/jquery.cookie.js"></script>
<script src="../../../yl/jquery.easyui.min.js"></script>
<script src="../../../yl/jquery.easyui.mobile.js"></script>
<script src="../../../yl/moment.min.js"></script>
<script src="../../../utils/xlsx.full.min.js"></script>
<script src="../../../utils/pdf.min.js"></script>
<script src="../../../api/request.js"></script>
<script src="./js/add.js"></script>

</html>